package com.bauer.springboot.starter.listener;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @description:
 * @author: weirui
 * @create: 2020-01-15 16:54
 **/
public class AppConfigRunListener implements SpringApplicationRunListener {

    public AppConfigRunListener(SpringApplication application, String[] args) {
    }

    @Override
    public void starting() {
        System.setProperty("log.level","info");
        System.setProperty("log.path","/var/log");
    }

    @Override
    public void environmentPrepared(ConfigurableEnvironment environment) {
    }

    @Override
    public void contextPrepared(ConfigurableApplicationContext context) {
    }

    @Override
    public void contextLoaded(ConfigurableApplicationContext context) {
    }

    @Override
    public void started(ConfigurableApplicationContext context) {
    }

    @Override
    public void running(ConfigurableApplicationContext context) {
    }

    @Override
    public void failed(ConfigurableApplicationContext context, Throwable exception) {
    }
}
